package com.nbjtjc.safe.schedule;

import com.nbjtjc.safe.bean.MyCache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @auther guqianbin
 * @date 2018/6/2 13:50
 **/
@Component
public class CacheSchedule {

    @Autowired
    private MyCache myCache;


    /**
     * 初始化缓存数据
     */
    @Scheduled(initialDelay = 10000,fixedRate = 9000000)
    public void initCache(){
//        myCache.init();
    }
}
